package cn.tedu.spring.file;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Author: Miyako
 * @Date: 2024-08-03-10:16
 * @Description:
 */
@PropertySource("classpath:application.properties")
@Component
public class Database {

    Database(){

    }
    @Value("${spring.database.url}")
    private  String url;
    @Value("${spring.database.username}")
    private String username;
    @Value("${spring.database.password}")
    private  String password;

    @Override
    public String toString() {
        return "Database{" +
                "url='" + url + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
